package com.itcast.service.impl;

import com.itcast.mapper.ShoppingcartMapper;
import com.itcast.pojo.Shoppingcart;
import com.itcast.service.Shoppingcartservice;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2020-06-19
 */
@Service("shoppingcartservice")
public class ShoppingcartServiceImpl extends ServiceImpl<ShoppingcartMapper,Shoppingcart> implements Shoppingcartservice {

    @Autowired
    private  ShoppingcartMapper shoppingcartMapper;


    @Override
    public Shoppingcart getCart(Integer gid, int uId) {
        return shoppingcartMapper.getCart(gid,uId);
    }

    @Override
    public List<Shoppingcart> getCartList(Integer uId) {
        return shoppingcartMapper.getCartList(uId);
    }

    @Override
    public List<Shoppingcart> getListBay(int i) {
        return shoppingcartMapper.getListBayIndex(i);

    }

    @Override
    public int dels(String idss) {
        return shoppingcartMapper.dels(idss);
    }
}
